package com.xiaoshuidi.cloud.module.contract.enums.contract;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description:
 * @author: zhaoyu
 * @date: 2023/7/13
 */
@Getter
@AllArgsConstructor
public enum ContractHomeTypeEnum {
    //类型 应收账单 应付账单 租客合同 业主合同
    RENTORDER("rentOrder", "应收账单"),
    OWNERRENTORDER("ownerRentOrder", "应付账单"),
    CONTRACT("contract", "租客合同"),
    OWNERCONTRACT("ownerContract", "业主合同");
    //编码
    private final String code;
    //信息
    private final String msg;

    public static ContractHomeTypeEnum getByCode(String code) {
        for(ContractHomeTypeEnum e : ContractHomeTypeEnum.values()){
            if(e.code.equals(code)){
                return e;
            }
        }
        return null;
    }
}
